package com.vma.jifu.controller;

import com.vma.jifu.service.AgentService;
import com.vma.jifu.service.impl.AgentServiceImpl;

/**
 * Created by chenzui on 2017/6/27.
 */
public class UserAgentController extends BaseController {
    private AgentService agentService = new AgentServiceImpl();
    public void qryMyAgent(){
        Integer id = getParaToInt("id");
        Integer cPage = getParaToInt("cPage");
        Integer pSize = getParaToInt("pSize");
        String account = getPara("account");
        renderRes(agentService.getFirstAgent(cPage,pSize,id,account));
    }

    public void commitAgentInfo(){
        Integer joinId = getParaToInt("joinId");
        Integer userId = getParaToInt("userId");
        String tjren = getPara("tjren");
        String phone = getPara("phone");
        String agentName = getPara("agentName");
        renderRes(agentService.commitAgentInfo(joinId,userId,tjren,phone,agentName));
    }

    public void checkArea(){
        String province = getPara("province");
        String city = getPara("city");
        String area = getPara("area");
    }

    public void qryAgentArea(){
        String province = getPara("province");
        String city = getPara("city");
        String area = getPara("area");
        renderRes(agentService.qryAgentArea(province,city,area));
    }
}
